package com.shigen.file.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 登录日志表
 * </p>
 *
 * @author shigen.fu
 * @since 2022-06-04
 */
@TableName("login_log")
@ApiModel(value = "LoginLog对象", description = "登录日志表")
@Data
@Accessors(chain = true)
public class LoginLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("自增的访问编号")
    @TableId(value = "auto_id", type = IdType.AUTO)
    private Integer autoId;

    @ApiModelProperty("用户id")
    private Integer id;

    @ApiModelProperty("登录的用户名")
    private String username;

    @ApiModelProperty("设备码")
    private String murmur;

    @ApiModelProperty("登录地点")
    private String location;

    @ApiModelProperty("浏览器")
    private String browser;

    @ApiModelProperty("操作系统")
    private String os;

    @ApiModelProperty("登录状态 0-成功 1-失败")
    private Integer status;

    @ApiModelProperty("登录日期")
    private LocalDateTime loginTime;

    @ApiModelProperty("登录地址")
    private String ipAddr;

    @Override
    public String toString() {
        return "LoginLog{" +
        "autoId=" + autoId +
        ", id=" + id +
        ", username=" + username +
        ", murmur=" + murmur +
        ", location=" + location +
        ", browser=" + browser +
        ", os=" + os +
        ", status=" + status +
        ", loginTime=" + loginTime +
        ", ipAddr=" + ipAddr +
        "}";
    }
}
